<?php
class Rating extends AppModel {

    public $belongsTo = array(
    'Article' => array('className' => 'Article',
    'foreignKey' => 'article_id',
    'conditions' => '',
    'fields' => '',
    'order' => '',
    'counterCache' => ''),
    );

    public function find_by_id($ip_address = null,$article_id = null) {
        return (bool)$this->find(array('article_id'=>$article_id,'ip_address'=>$ip_address));
    }
}
?>